package com.ycy.smartcourseselection.common;

import lombok.ToString;

@ToString
public enum ResCodeEnum {
    SUCCESS(200, "请求成功"),

    BAD_REQUEST(400, "请求参数错误"),

    NO_PERMISSION(403, "无权限访问"),

    NOT_FOUND(404, "资源不存在"),

    SERVER_ERROR(500, "服务器错误");

    // USER_NOT_EXIST(4000, "用户不存在"),
    // USER_OR_PWD_ERROR(4001, "用户名或密码错误"),
    // PASSWORD_ERROR(4002, "密码错误"),
    // ENTERED_PASSWORD_DIFFER(4003, "两次输入的密码不一致"),
    // PASSWORD_UNCHANGED(4004, "新密码和旧密码不能一致"),
    // SUCCESSFULLY_MODIFY_PASSWORD(4005, "修改密码成功"),
    // INVALID_TOKEN(4006, "访问令牌无效，请检查"),
    // ACCESS_TOKEN_EXPIRED(4006, "访问令牌已过期"),
    // INVALID_REFRESH_TOKEN(4007, "无效的刷新令牌"),
    // MOBILE_NO_FOUND(4009, "无效的授权代码"),
    // LOGIN_EXCEPTION(4010, "登录失败"),
    // VERIFICATION_CODE_ERROR(4011, "验证码错误"),
    // USER_ID_DISABLED(4013, "用户已禁用，请联系管理员"),
    // USER_ID_LOCKED(4014, "用户已被锁定，请联系管理员"),
    // ACCOUNT_EXCEPTION(4014, "账号已登录，请修改密码");

    private final Integer code;

    private final String message;

    //构造函数
    ResCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
